#pragma once

#include "Shader.h"
#include <d3dx11async.h>


namespace Graphics
{
	class Texture;
}

namespace Graphics
{
class ReflectionShader : public Shader
{
	RTTI_DECLARATIONS(ReflectionShader, Graphics::Shader)
private:
	struct ReflectionBufferType
	{
		D3DXMATRIX ReflectionMatrix;
	};

public:
	ReflectionShader(void);

	virtual ~ReflectionShader(void);

	bool Initialize();

	void Deinitialize();

	bool Render(int indexCount, D3DXMATRIX worldMatrix, D3DXMATRIX viewMatrix, D3DXMATRIX projectionMatrix,  
				Texture* texture, Texture* reflectionTexture, D3DXMATRIX reflectionMatrix);

private:
	bool InitializeShader(HWND winHandle, const char* vertexShaderName, const char*  pixelShaderName);

	void DeinitializeShader();

	bool SetShaderParameters(D3DXMATRIX worldMatrix, D3DXMATRIX viewMatrix, D3DXMATRIX projectionMatrix, 
				Texture* texture, Texture* reflectionTexture, D3DXMATRIX reflectionMatrix);

private:
	ID3D11Buffer* mReflectionBuffer;
};
}